home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
FILEBOX.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
66 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_FileBox( nTRow, nTCol, nBRow, cFileSpec, nBoxType, cBoxColor ) --> cFileStr
PARAMETERS:
nRow : Top Left Corner ROW of picklist box (DEFAULT: 0)
nCol : Top Left Corner COL of picklist box (DEFAULT: 0)
nBRow : Bottom Row of picklist box (DEFAULT: MaxRow())
cFileSpec : file selection specification (DEFAULT: *.*)
nBoxType : Box Border Type (DEFAULT: DOUBLETOP )
cBoxColor : Color string for box color (DEFAULT: current color)
SHORT:
Display picklist of specified files and return filename/ext.
DESCRIPTION:
_FileBox() presents a list of files in the current directory that
match cFileSpec. A lightbar selection selects a file and returns the
file name.
nTRow and nTCol define the top left corner origins of the box. nBRow
defines the bottom row where the pick list box ends.
The width is always 18 (12 for the file name, 2 for spacing, 2 for the
window borders and 2 more for the box shadow - The shadow may be
two characters wide depending upon the setting of the KBOXHIGH variable -
See _Box() for more information).
nBoxType is a numeric that is passed to _Box(). See _Box() for information
on Box Types.
cBoxColor is the color string passed to SETCOLOR() for setting the
display color of the box.
_FileBox() will RETURN("") (empty string) if ESC is pressed, or if enter
is pressed on a blank line. Blank lines can exist when the number of
matching files is not sufficient to fill the number of lines defined
by ((nBRow-nTRow)-2).
NOTE:
See also: _FileList() for a similar function without the box drawing.
_FileList() operates similarly but provides only the raw file list with no
box or labeling. Use it when you want to draw your own box and labels with
the picklist inside that.
EXAMPLE:
#define BUDGET_FILES '*.BGT'
t = _FileBox(5,5,10,BUDGET_FILES,BOXDOUBLE,'Available Budget Files')
Result: a file pick list is presented with the top corner at 5,5 and ending
on line 10 (resulting in 4 lines for the file listing and two lines for
the border). When ENTER is pressed on the file, that file name is returned.
******************************************************************************/